
import http from '../utils/http'
// 分类接口
class Category {
  static async getCategoryList() {
    return http.request({
      url: 'v1/category',
      method:'GET'
    })
  }
  // 给接口添加全部功能
  static async getCategoryListWithAll() {
    const categoryList =await Category.getCategoryList()
    categoryList.unshift({id: 0, name: '全部'})
    return categoryList
  }
}
export default Category 